package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc FrameNavMenusDto
 * @使用场景
 */
@Data
public class FrameNavMenusDto extends BaseDto implements Serializable {

    /**
     * 选项结果ID
     */
    @ApiModelProperty("选项结果ID")
    private String optionResultId;

    /**
     * 配置项标识
     */
    @ApiModelProperty("配置项标识")
    private String confItemCode;

    /**
     * 配置项简称
     */
    @ApiModelProperty("配置项简称")
    private String shortName;

    /**
     * 选项标识
     */
    @ApiModelProperty("选项标识")
    private String confOptionCode;

    /**
     * 选项名称
     */
    @ApiModelProperty("选项名称")
    private String confOptionName;

    /**
     * 选项商业位置 MAIN_MENUS:主菜单 IN_MAIN_MENUS:主菜单内 THROW_PLACE_IN_MAIN_MENUS:主菜单内商业位置
     */
    @ApiModelProperty("选项商业位置")
    private String optionThrowPlace;

    /**
     * 答案结果值
     */
    @ApiModelProperty("答案结果值")
    private String endValue;

    /**
     * 扩展字段1
     */
    @ApiModelProperty("扩展字段1 ")
    private String extensionField1;

    /**
     * 扩展字段2
     */
    @ApiModelProperty("扩展字段2")
    private String extensionField2;

    /**
     * 扩展字段3
     */
    @ApiModelProperty("扩展字段3 ")
    private String extensionField3;

    /**
     * 选项排序
     */
    @ApiModelProperty("选项排序")
    private Long confOptionSortNum;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        FrameNavMenusDto that = (FrameNavMenusDto) o;
        return (
                optionResultId == that.optionResultId &&
                        confItemCode == that.confItemCode &&
                        shortName == that.shortName &&
                        confOptionCode == that.confOptionCode &&
                        confOptionName == that.confOptionName &&
                        optionThrowPlace == that.optionThrowPlace &&
                        endValue == that.endValue &&
                        extensionField1 == that.extensionField1 &&
                        extensionField2 == that.extensionField2 &&
                        extensionField3 == that.extensionField3 &&
                        confOptionSortNum == that.confOptionSortNum
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                optionResultId,
                confItemCode,
                shortName,
                confOptionCode,
                confOptionName,
                optionThrowPlace,
                endValue,
                extensionField1,
                extensionField2,
                extensionField3,
                confOptionSortNum
        );
    }

}
